package com.minimalist.common.entity.lindi.vo.enterpriseregistration;

import cn.hutool.core.date.DatePattern;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.minimalist.common.utils.Update;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Objects;

/**
 * @author 11987
 */

@Schema(name = "林地指标平台_企业注册信息审核实体")
public class LindiEnterpriseRegistrationAuditVO implements Serializable{
    @Serial
    private static final long serialVersionUID = 1L;

    @NotNull(message = "企业注册ID不能为空", groups = {Update.class})
    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "enterpriseRegistrationId", description = "企业注册ID"
            , type = "string")
    private Long enterpriseRegistrationId;

    /**
     * 状态 0审核中 1审核通过 2审核未通过
     */
    @NotNull(message = "企业审核状态不能为空", groups = {Update.class})
    @Schema(name = "status", description = "企业申请审核状态", type = "integer")
    private Integer status;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "createId", description = "更新人ID", type = "string")
    private Long updateId;

    @Schema(name = "updateTime", description = "更新时间", type = "string")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private LocalDateTime updateTime;

    public LindiEnterpriseRegistrationAuditVO(){
    }

    public Long getEnterpriseRegistrationId(){
        return enterpriseRegistrationId;
    }

    public void setEnterpriseRegistrationId(Long enterpriseRegistrationId){
        this.enterpriseRegistrationId = enterpriseRegistrationId;
    }

    public Integer getStatus(){
        return status;
    }

    public void setStatus(Integer status){
        this.status = status;
    }

    public Long getUpdateId(){
        return updateId;
    }

    public void setUpdateId(Long updateId){
        this.updateId = updateId;
    }

    public LocalDateTime getUpdateTime(){
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime){
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o){
        if (this == o){
            return true;
        }
        if (o == null || getClass() != o.getClass()){
            return false;
        }
        LindiEnterpriseRegistrationAuditVO that = (LindiEnterpriseRegistrationAuditVO) o;
        return Objects.equals(enterpriseRegistrationId, that.enterpriseRegistrationId) && Objects.equals(status, that.status) && Objects.equals(updateId, that.updateId) && Objects.equals(updateTime, that.updateTime);
    }

    @Override
    public int hashCode(){
        return Objects.hash(enterpriseRegistrationId, status, updateId, updateTime);
    }
}
